import Vue from "vue";
import axios from 'axios';
import qs from "qs";
import {devBaseURL, proBaseURL, timeout} from "../common/const";

axios.defaults.withCredentials = true;
axios.defaults.timeout = timeout;

if (process.env.NODE_ENV !== 'production') {
    axios.defaults.baseURL = devBaseURL
} else {
    axios.defaults.baseURL = proBaseURL
}

Vue.prototype.$http = axios;
Vue.prototype.qs = qs;

